/*
 * Copyright (c) 2024-present HBIS Digital Technology Co.,Ltd. All rights reserved.
 */
package com.hbisdt.cet.sample.servlet;

import jakarta.servlet.ServletContextEvent;
import jakarta.servlet.ServletContextListener;
import jakarta.servlet.annotation.WebListener;
import org.springframework.stereotype.Component;

/**
 * 监听器示例
 *
 * @author : 教学示例
 * @version : 1.0
 * @date : 2025-02-11 15:21
 */
@WebListener
//@Component
public class ListenerSample implements ServletContextListener {

    /**
     * 监听初始化
     *
     * @author : 教学示例
     */
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("ListenerSample contextInitialized");
    }

    /**
     * 监听销毁
     *
     * @author : 教学示例
     */
    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("ListenerSample contextDestroyed");
    }
}
